<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        * {
            margin: 0;
            padding: 0;
        }
        body {
            background-color: #ccc;
        }
        img {
            width: 100%;
            vertical-align: middle;
        }
        .container {
            width: 1000px;
            height: 600px;
            background-color: #fff;
            margin: 0 auto;
            position: relative;
        }
        .container > div {
            border-radius: 8px;
            box-shadow: 0 0 6px #333;
        }
        .container > div::before{
            content: "";
            display: block;
            width: 2px;
            height: 2px;
            border-radius: 50%;
            box-shadow: 0 0 4px 2px #fff;
            /* background-color: rgba(255, 255, 255, 0); */
            background-color: #fff;
            position: absolute;
            left: 8px;
            top: 8px
        }
        .msg {
            width: 600px;
            height: 200px;
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%,-50%);
            text-align: center;
            background-color: #fff;
            border: 1px solid #000;
            box-shadow: 0 0 8px 2px #333;
            border-radius: 10px;    
            display: none;
        }
        .msg-end {
            font-size: 60px;
            padding: 20px 0;
        }
        .restart {
            padding: 6px 12px;
            border: 1px solid #000;
            border-radius: 4px;
            position: absolute;
            top: 150px;
            left: 50%;
            transform: translateX(-50%);
            cursor: pointer;
            box-shadow: 2px 2px 4px 0 #333;
        }
        .restart:hover{
            background-color: rgba(155, 155, 155, .35);
            box-shadow: 2px 2px 4px 0 #333,2px 2px 4px #fff inset;
        }
        div.food {
            border-radius: 8px;
        }
        .food > img {
            border-radius: 8px;
            animation: food ease-in-out 100ms infinite;
        }

        @keyframes food{
            0%,100%{
                transform: rotateZ(-15deg);
            }
            50% {
                transform: rotateZ(15deg);
            }
        }
        .snakeHead {
            width: 40px;
            height: 40px;
            position: relative;
            transition: all 150ms;
        }
        .container .snakeHead::before,.container .snakeHead::after {
            content: '';
            position: absolute;
            top: 20%;
            width: 8px;
            height: 8px;
            background-color: #000;
            border-radius: 4px;
        }
        .container .snakeHead::before {
            left: 20%;
        }
        .container .snakeHead::after {
            right: 20%;
        }
        .snakeHead.top {
            transform: rotateZ(0);
        }
        .snakeHead.left {
            transform: rotateZ(-90deg);
        }
        .snakeHead.bottom {
            transform: rotateZ(-180deg);
        }
        .snakeHead.right {
            transform: rotateZ(-270deg);
        }
    </style>
</head>
<body>
    <div class="container">
        <!-- <div class="snakeHead right"></div> -->
    </div>
    <div class="msg">
        <div class="msg-end">Game Over</div>
        <div class="restart">Restart</div>
    </div>
</body>
</html>
<script src="js/main.js" type="module"></script>
